<script setup lang="ts">
import type { PropType } from 'vue';
defineProps({
  type: {
    type: String as PropType<'default|red|cyan|info|green'>,
    default: 'default',
  },
  size: {
    type: String as PropType<'mini|large|middle'>,
    default: 'middle',
  },
  color: {
    type: String,
    default: '#999',
  },
});
</script>
<template>
  <button :class="`${type} ${size}`">
    <slot></slot>
  </button>
</template>
<style lang="less" scoped>
button {
  text-align: center;
  appearance: none;
  border: none;
  outline: none;
  background: #fff;
  text-align: center;
  border: 1px solid transparent;
  border-radius: 4px;
  cursor: pointer;
}
.default {
  color: #999;
  background-color: #fff;
  border: 1px solid #999;
}

.red {
  color: #fff;
  background-color: red;
  border: 1px solid red;
}
.cyan {
  color: #fff;
  background-color: cyan;
  border: 1px solid cyan;
}
.info {
  color: #fff;
  background-color: skyblue;
  border: 1px solid skyblue;
}
.green {
  color: #fff;
  background-color: green;
  border: 1px solid green;
}
.large {
  width: 320px;
  height: 50px;
  font-size: 16px;
  line-height: 50px;
}
.middle {
  width: 80px;
  height: 40px;
  font-size: 14px;
  line-height: 30px;
}
.mini {
  width: 40px;
  height: 20px;
  font-size: 10px;
}
</style>
